clear
use ${data}all_int_days.dta

local Xind "gpa undergrad_satmt75   major_socialScience major_mathScience major_humanities doubleMajor yearsSinceCollege_1_2 yearsSinceCollege_3_5 yearsSinceCollege_6p female black hispanic otherRace undergrad_sat_ms "

local XintDA "gpa_da undergrad_satmt75_da  major_socialScience_da major_mathScience_da major_humanities_da doubleMajor_da yearsSinceCollege_1_2_da yearsSinceCollege_3_5_da yearsSinceCollege_6p_da female_da black_da hispanic_da otherRace_da undergrad_sat_ms_da"


keep if round==1

* Are individual covariates correlated with first round interviews?
eststo clear
foreach var of varlist cps nwi  {
eststo `var': reg `var' `Xind' i.d  if da==0, robust
test `Xind'
estadd scalar p = r(p) : `var'
}


foreach var of varlist level1 level2 level3 unrated Black Hispanic {
eststo  `var': reg `var' `Xind' i.d if  da==0, robust
test `Xind'
estadd scalar p = r(p) : `var'
}	

	

estout  cps nwi level1 level2 level3 unrated Black Hispanic using ${results}tableA10.txt, replace ///
	keep(`Xind') cells(b(star fmt(2))  se(par fmt(2))) ///
	collabels(,none) stats(p  N ) 
	

* Test if relationships are different when DA is used

eststo clear
foreach var of varlist cps nwi  {
eststo: reg `var' `Xind' `XintDA' i.d  , robust
eststo `var'
test `XintDA'
estadd scalar p = r(p) : `var'
}



foreach var of varlist level1 level2 level3 unrated Black Hispanic {
eststo `var': reg `var' `Xind' `XintDA' i.d , robust
test `XintDA'
estadd scalar p = r(p) : `var'
}



estout  cps nwi level1 level2 level3 unrated Black Hispanic using ${results}tableA3.txt, replace ///
	keep(`XintDA') cells(b(star fmt(2))  se(par fmt(2))) ///
	collabels(,none) stats(p N ) 
	

exit
